package cn.gjxblog.service;

import cn.gjxblog.model.entity.User;

import java.util.List;

/**
 * @author gjx
 * @version v1.0
 * @Description
 * @date 2018/12/7 16:26
 */
public interface UserService {
    /**
     *
     * @param user 用户
     * @param enableUrl 激活地址
     * @return
     */
    boolean addUser(User user,String enableUrl);

    void enable(String key);

    String auth(String phone, String passwd);

    User getLoginedUserByToken(String token);

    void invalidate(String token);

    User updateUser(User user);

    User getUserById(String id);

    List<User> getUsersByCondition(User user);

    User getUserByEmail(String email);

    void resetNotify(String email, String url);

    String getEmailByKey(String key);

    User resetPwd(String key, String password);
}
